#pragma once

#include "ColumnDef.h"
#include "string"
#include "string_view"
#include "vector"

class TableSchema {
private:
    std::string name_;
    std::vector<ColumnDef> columns_;

public:
    TableSchema(std::string_view name): name_(name) 
    {
    }

    std::string name() const 
    {
        return name_;
    }

    void addColumn(const ColumnDef& column)
    {
        columns_.push_back(column);
    }

    ColumnDef column(size_t index) const 
    {
        return columns_[index];
    }

    size_t columnCount() const
    {
        return columns_.size();
    }
};